package com.mchsdk.paysdk.activity;
import com.mchsdk.paysdk.bean.ChoosePayModel;
import com.mchsdk.paysdk.bean.MCPayModel;
import com.mchsdk.paysdk.utils.MCHInflaterUtils;

import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Toast;

public class MCChoosePayActivity extends MCBaseActivity{
//	int layoutRes;// 布局文件
//	String viewName;//布局文件的名称
//	String viewChoice="";//布局文件名称后缀
//	Context context;

	ChoosePayModel choosePayModel;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
//		context = this;
		int payviewLayoutId = MCHInflaterUtils.getLayout(MCChoosePayActivity.this, "activity_mch_choosepay");
		View customView = LayoutInflater.from(MCChoosePayActivity.this).inflate(payviewLayoutId, null);
		setContentView(customView);

		choosePayModel = new ChoosePayModel(MCChoosePayActivity.this, customView);
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
			MCPayModel.Instance().getPck().callback("-1");//支付取消
		}
		return super.onKeyDown(keyCode, event);
	}
}
